<template>
  <div class="Create_League_container">
    <!-- 顶部导航栏 -->
    <div id="mine">
      <van-nav-bar
        title="创建联赛"
        right-text="创建"
        @click-right="onClickRight"
      />
    </div>

    <!-- 进度显示栏 -->
    <div id="info_box">
      <van-tabs v-model="activeName">
        <van-tab title="基本资料" name="a">
          <leagueInfo1></leagueInfo1>
        </van-tab>
        <van-tab title="赛事信息" name="b">
          <leagueInfo2></leagueInfo2>

        </van-tab>
        <van-tab title="其他信息" name="c">
          <leagueInfo3></leagueInfo3>

        </van-tab>
      </van-tabs>
    </div>

  </div>
</template>

<script>
import leagueInfo1 from '@/components/Create_League/leagueinfo1/leagueinfo1.vue'
import leagueInfo2 from '@/components/Create_League/leagueinfo2/leagueinfo2.vue'
import leagueInfo3 from '@/components/Create_League/leagueinfo3/leagueinfo3.vue'
import { mapState } from 'vuex'
export default {
  name: 'CreateLeague',
  data() {
    return {
      activeName: 'a'

    }
  },
  components: {
    leagueInfo1,
    leagueInfo2,
    leagueInfo3
  },
  computed: {
    ...mapState(['CreateLeague_obj'])
  },
  methods: {
    // 点击保存本页面所填写的信息
    onClickRight() {
      // console.log(this.CreateLeague_function)
      this.$store.commit('CreateLeague_function', this.CreateLeague_obj)
      // this.$toast('创建成功')
      // console.log(this.CreateLeague_obj.data[0])
    }
  }
}
</script>

<style scoped>
#mine /deep/ .van-nav-bar__title{
  color: rgb(0, 0, 0) !important;
  /* font-size: 1rem; */
}
#mine /deep/ .van-nav-bar__text{
  color: rgb(0, 0, 0) !important;
  /* font-size: 1rem; */
}

</style>
